let SendTextToWebSocket = (text: string, socket: WebSocket) => new Promise((resolve, reject) => {
    socket.onmessage = async (event) => {
        resolve(event.data);
    }
    socket.send(text);
});

export {SendTextToWebSocket};